<template>
	<view>
		<view class="title_min">用于为你推荐个性化商品及优惠</view>
		<view class="" style="height: 1rpx;width: 100%;background-color: #f5f5f5;"></view>
		<view class="title_btn">
			<view class="text">定向推送</view>
			<u-switch activeColor="#34be70" v-model="value" @change="change"></u-switch>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				value:false
			}
		},
		onLoad() {
			this.value = uni.getStorageSync('is_value')
		},
		methods: {
			change(e) {
				console.log('change', e);
				uni.setStorageSync('is_value',e)
			},
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #f0f0f0;
	}
	.title_min {
		background-color: #FFF;
		color: #a0a0a0;
		font-size: 26rpx;
		padding: 0 30rpx;
		line-height: 80rpx;
		margin-top: 20rpx;
	}
	
	.title_btn {
		background-color: #FFF;
		padding: 0 30rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		height: 120rpx;
	}
</style>